"""
数据库初始化脚本
"""

from dao.postgresql_connect import Base, engine

def init_db():
    """初始化数据库表"""
    try:
        Base.metadata.create_all(bind=engine)
    except Exception as e:
        print(f"数据库表创建失败: {str(e)}")
        raise

if __name__ == '__main__':
    init_db() 